package com.pxst.internalReports.req;


import com.pxst.annotations.validated.DecimalValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Chrissy
 * @description 虚拟银行对账单的搜索接收实体
 */
@ApiModel(value = "接收前端发送的虚拟银行对账单的搜索条件参数")
public class VirtualBankStatementSearchReq {
    /**
     * 银行卡群表的类别
     */
    @ApiModelProperty(value = "银行卡群表的类别")
    private Integer groupType;

    /**
     * 银行对账单的系统银行卡信息Id字段
     */
    @ApiModelProperty(value = "银行对账单的系统银行卡信息Id字段")
    private Integer sysBankGroupId;

    /**
     * 银行对账单的系统可用银行Id字段
     */
    @ApiModelProperty(value = "银行对账单的系统可用银行Id字段")
    private Integer sysAvailableBankId;

    /**
     * 银行对账单的商户Id字段
     */
    @ApiModelProperty(value = "银行对账单的商户Id字段")
    private ArrayList<Integer> merchantId;

    /**
     * 银行对账单的Id字段
     */
    @ApiModelProperty(value = "银行对账单的Id字段")
    private Integer SysBankBillId;

    /**
     * 系统银行卡信息的账户码字段
     */
    @ApiModelProperty(value = "系统银行卡信息的账户码字段")
    private String accountCode;

    /**
     * 银行对账单的我们的单号字段
     */
    @ApiModelProperty(value = "银行对账单的我们的单号字段")
    private String commandId;

    /**
     * 银行对账单的交易时间起始段
     */
    @NotNull(message = "银行对账单的交易时间起始段不能为空")
    @ApiModelProperty(value = "银行对账单的交易时间起始段", allowEmptyValue = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime tradeTimeStart;

    /**
     * 银行对账单的交易时间结束段
     */
    @NotNull(message = "银行对账单的交易时间结束段不能为空")
    @ApiModelProperty(value = "银行对账单的交易时间结束段", allowEmptyValue = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime tradeTimeEnd;

    /**
     * 银行对账单的交易模式字段
     */
    @ApiModelProperty(value = "银行对账单的交易模式字段")
    private Integer txnMode;

    /**
     * 银行对账单的币种字段
     */
    @NotBlank(message = "银行对账单的币种字段不能为空")
    @ApiModelProperty(value = "银行对账单的币种字段", allowEmptyValue = true)
    private String currency;

    /**
     * 银行对账单的类型字段
     */
    @ApiModelProperty(value = "银行对账单的类型字段")
    private ArrayList<Integer> type;

    /**
     * 该字段接收的是银行对账单的转入、转出两个字段的范围（有就表示credit和debit都要做限制）
     */
    @ApiModelProperty(value = "该字段接收的是银行对账单的转入、转出两个字段的范围（有就表示credit和debit都要做限制）")
    private List<BigDecimal> amount;

    /**
     * 接收对银行对账单的转出字段的限制
     */
    @ApiModelProperty(value = "接收对银行对账单的转出字段的限制")
    private List<BigDecimal> debit;

    /**
     * 接收对银行对账单的转入字段的限制
     */
    @ApiModelProperty(value = "接收对银行对账单的转入字段的限制")
    @DecimalValidator
    private List<BigDecimal> credit;

    /**
     * 银行对账单的是否作废字段（严格来讲有4种类型）
     */
    @ApiModelProperty(value = "银行对账单的是否作废字段（严格来讲有4种类型）")
    private Integer showVoid;

    /**
     * 银行对账单的描述字段
     */
    @ApiModelProperty(value = "银行对账单的描述字段")
    private String description;

    /**
     * 银行对账单的更新时间起始范围
     */
    @ApiModelProperty(value = "银行对账单的更新时间起始范围")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedStartDate;

    /**
     * 银行对账单的更新时间结束范围
     */
    @ApiModelProperty(value = "银行对账单的更新时间结束范围")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedEndDate;

    /**
     * 不知道有啥用，PHP里面也没找到有啥用（所以我没看见QAQ）
     */
    @ApiModelProperty(value = "不知道有啥用，PHP里面也没找到有啥用")
    private String accountNo;

    public Integer getGroupType() {
        return groupType;
    }

    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }

    public Integer getSysBankGroupId() {
        return sysBankGroupId;
    }

    public void setSysBankGroupId(Integer sysBankGroupId) {
        this.sysBankGroupId = sysBankGroupId;
    }

    public Integer getSysAvailableBankId() {
        return sysAvailableBankId;
    }

    public void setSysAvailableBankId(Integer sysAvailableBankId) {
        this.sysAvailableBankId = sysAvailableBankId;
    }

    public ArrayList<Integer> getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(ArrayList<Integer> merchantId) {
        this.merchantId = merchantId;
    }

    public Integer getSysBankBillId() {
        return SysBankBillId;
    }

    public void setSysBankBillId(Integer sysBankBillId) {
        SysBankBillId = sysBankBillId;
    }

    public String getAccountCode() {
        return accountCode;
    }

    public void setAccountCode(String accountCode) {
        this.accountCode = accountCode;
    }

    public String getCommandId() {
        return commandId;
    }

    public void setCommandId(String commandId) {
        this.commandId = commandId;
    }

    public LocalDateTime getTradeTimeStart() {
        return tradeTimeStart;
    }

    public void setTradeTimeStart(LocalDateTime tradeTimeStart) {
        this.tradeTimeStart = tradeTimeStart;
    }

    public LocalDateTime getTradeTimeEnd() {
        return tradeTimeEnd;
    }

    public void setTradeTimeEnd(LocalDateTime tradeTimeEnd) {
        this.tradeTimeEnd = tradeTimeEnd;
    }

    public Integer getTxnMode() {
        return txnMode;
    }

    public void setTxnMode(Integer txnMode) {
        this.txnMode = txnMode;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public ArrayList<Integer> getType() {
        return type;
    }

    public void setType(ArrayList<Integer> type) {
        this.type = type;
    }

    public List<BigDecimal> getAmount() {
        return amount;
    }

    public void setAmount(List<BigDecimal> amount) {
        this.amount = amount;
        if (amount != null) {
            this.debit = amount;
            this.credit = amount;
        }
    }

    public List<BigDecimal> getDebit() {
        return debit;
    }

    public void setDebit(List<BigDecimal> debit) {
        this.debit = debit;
    }

    public List<BigDecimal> getCredit() {
        return credit;
    }

    public void setCredit(List<BigDecimal> credit) {
        this.credit = credit;
    }

    public Integer getShowVoid() {
        return showVoid;
    }

    public void setShowVoid(Integer showVoid) {
        this.showVoid = showVoid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getUpdatedStartDate() {
        return updatedStartDate;
    }

    public void setUpdatedStartDate(LocalDateTime updatedStartDate) {
        this.updatedStartDate = updatedStartDate;
    }

    public LocalDateTime getUpdatedEndDate() {
        return updatedEndDate;
    }

    public void setUpdatedEndDate(LocalDateTime updatedEndDate) {
        this.updatedEndDate = updatedEndDate;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }
}
